package com.example.demo_job.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data // 可以自动添加get和set方法
@AllArgsConstructor  // 全参构造方法
@NoArgsConstructor   // 空参构造方法
public class OneComMulPosition {
    private int cid;
    private  String cusername;
    private String cname;
    private String cpassword;
    private String cyear;
    private String caddress;
    private String cinfo;
    private String cemail;
    private String cphone;
    List<Position> positionList=new ArrayList<Position>();
    public OneComMulPosition(Company company,List<Position> positionList2){
        this.positionList.addAll(positionList2);

        this.cid=company.getCid();
        this.cusername=company.getCusername();
        this.cname=company.getCname();
        this.cpassword=company.getCpassword();
        this.cyear=company.getCyear();
        this.caddress=company.getCaddress();
        this.cinfo=company.getCinfo();
        this.cemail=company.getCemail();
        this.cphone=company.getCphone();
    }
    public OneComMulPosition(Company company){
        this.cid=company.getCid();
        this.cusername=company.getCusername();
        this.cname=company.getCname();
        this.cpassword=company.getCpassword();
        this.cyear=company.getCyear();
        this.caddress=company.getCaddress();
        this.cinfo=company.getCinfo();
        this.cemail=company.getCemail();
        this.cphone=company.getCphone();
    }

}
